package com.lee.mysql.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

@ApiModel(description="用户表")
public class User implements Serializable {
   private static final long serialVersionUID = 1L;

   /** 超级管理员 */
   public static final int ISADMIN = 1;

    /** 主键 */
    @ApiModelProperty(name="主键",value="主键")
    private String id;
    
    /** 姓名 */
    @ApiModelProperty(name="姓名",value="姓名")
    private String userName;
    
    /** 登录账号 */
    @ApiModelProperty(name="登录账号",value="登录账号")
    private String loginName;
    
    /** 密码 */
    @ApiModelProperty(name="密码",value="密码")
    private String password;
    
    /** 盐值 */
    @ApiModelProperty(name="盐值",value="盐值")
    private String salt;
    
    /** 是否超级管理员 0否 1是 */
    @ApiModelProperty(name="是否超级管理员 0否 1是",value="是否超级管理员 0否 1是",required = false, hidden = true)
    private Integer isAdmin;

    /** 是否锁定 0未锁 1已锁定 */
    @ApiModelProperty(name="是否锁定 0未锁 1已锁定",value="是否锁定 0未锁 1已锁定")
    private Integer locked;


    /** 用户角色ID(单个,多个逗号隔开) */
    @ApiModelProperty(name="用户角色ID(单个,多个逗号隔开)",value="用户角色ID(单个,多个逗号隔开)")
    private String roleIds;

    /** 用户角色名称 */
    @ApiModelProperty(name="用户角色名称",value="用户角色名称",required = false, hidden = true)
    private String roleNames;

    /** 用户角色列表 */
    @ApiModelProperty(name="用户角色列表",value="用户角色列表",required = false, hidden = true)
    private List<Role> roleList;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Integer getIsAdmin() {
        return isAdmin;
    }

    public void setIsAdmin(Integer isAdmin) {
        this.isAdmin = isAdmin;
    }

    public Integer getLocked() {
        return locked;
    }

    public void setLocked(Integer locked) {
        this.locked = locked;
    }

    public String getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(String roleIds) {
        this.roleIds = roleIds;
    }

    public String getRoleNames() {
        return roleNames;
    }

    public void setRoleNames(String roleNames) {
        this.roleNames = roleNames;
    }

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", userName='" + userName + '\'' +
                ", loginName='" + loginName + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", isAdmin=" + isAdmin +
                ", locked=" + locked +
                ", roleIds='" + roleIds + '\'' +
                ", roleNames='" + roleNames + '\'' +
                ", roleList=" + roleList +
                '}';
    }
}